﻿using MediatR;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Provenance.ErrorCount;
using Provenance.Write.Api.Application.Command.Slaughter;

namespace Provenance.Write.Api.Controllers
{
    [Route("api/writeslaughter/[controller]/[action]")]
    [ApiController]
    public class SlaughterController : ControllerBase
    {
        private readonly IMediator _mediator;
        public SlaughterController(IMediator mediator)
        {
            _mediator = mediator;
        }
        [HttpPut]
        public async Task<ApiResult> UpSlaughterInfo(UpSlaughterInfoCommand param)
        {
            return await _mediator.Send(param);
        }
        [HttpPut]
        public async Task<ApiResult> UpSlaughterEnterprise(UpSlaughterEnterpriseCommand param)
        {
            return await _mediator.Send(param);
        }



    }
}
